package com.yt.app.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * Description
 * <p>
 * </p>
 * DATE 2017/10/4.
 *
 * @author liujunshi.
 */

@ApiModel(value = "UserOrderDetailVo", description = "订单详细信息")
public class UserOrderDetailVo {
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "商品ID")
    private Long productId;
    @ApiModelProperty(value = "商品名称")
    private String productName;
    @ApiModelProperty(value = "机构ID")
    private Long institutionId;
    @ApiModelProperty(value = "机构名称")
    private String institutionName;
    @ApiModelProperty(value = "商品图片")
    private String imageFile;
    @ApiModelProperty(value = "销售价")
    private Long salePrice;

    @ApiModelProperty(value = "卡号列表")
    private List<CardVo> cardList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Long getInstitutionId() {
        return institutionId;
    }

    public void setInstitutionId(Long institutionId) {
        this.institutionId = institutionId;
    }

    public String getInstitutionName() {
        return institutionName;
    }

    public void setInstitutionName(String institutionName) {
        this.institutionName = institutionName;
    }

    public String getImageFile() {
        return imageFile;
    }

    public void setImageFile(String imageFile) {
        this.imageFile = imageFile;
    }

    public Long getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(Long salePrice) {
        this.salePrice = salePrice;
    }

    public List<CardVo> getCardList() {
        return cardList;
    }

    public void setCardList(List<CardVo> cardList) {
        this.cardList = cardList;
    }

    public void addCard(CardVo cardVo) {
        if(this.cardList == null){
            cardList = new ArrayList<CardVo>();
        }
        cardList.add(cardVo);
    }
}
